package com.ckh.springboot.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ckh.springboot.entity.Goods;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ckh.springboot.entity.duihuanjiluVo;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author ckh
 * @since 2022-04-19
 */
public interface GoodsMapper extends BaseMapper<Goods> {

    Page<Goods> findPage(Page<Goods> page, @Param("name") String name);

    void deletePersonGoods(@Param("goodsId") Integer goodsId, @Param("personId") Integer personId);

    void setPersonGoods(@Param("goodsId") Integer goodsId, @Param("personId") Integer personId);

    int getUseGood(@Param("personId") Integer personId, @Param("goodsId") Integer goodsId);

    Page<duihuanjiluVo> getUserDhsp(Page<duihuanjiluVo> page, @Param("userId") Integer userId);
}
